﻿/**
 * @author sminutoli
 */
class com.dinmax.flash.utilities.textfield.TextFieldUtils {
	
	public static function validateField(field:TextField):Void {
		if(field.text == "" || field.text == undefined || field == undefined) {
			throw new Error("El Campo no tiene datos field= "+field+" field.text= "+field.text);
		};
		return;
	};
	
	public static function validateFields(fields:Array):Void {
		for (var i : Number = 0; i < fields.length; i++) {
			try {
				TextFieldUtils.validateField(fields[i]);
			} catch (e) {
				throw e;
			};
		};
		return;
	};
	
	public static function validateMail(field:TextField):Void {
		
	};
	
};